package com.demo.juc.base;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * @Author: shubin_yao
 * @Date: 2022/04/30/9:46
 * @Description: 用于线程测试
 */
public class ThreadMain {

    public static void main(String[] args) throws Exception {
       // T1Thread t1Thread = new T1Thread();
       // t1Thread.start();

        //T2RunnableThread t2 = new T2RunnableThread();
        //t2.run();

        ExecutorService executorService = Executors.newCachedThreadPool();
        Future<String> future = executorService.submit(new T3CallableThread());
        System.out.println(future.get());
    }
}
